package com.molin.IOtest.bytestreamTest.fileoutputStreamTest;

import java.io.FileOutputStream;
import java.io.IOException;

public class OutputDemo4 {
    public static void main(String[] args) throws IOException {
        String path="D:\\IdeaProjects\\BasicCode\\mIdeaTest\\src\\com\\molin\\IOtest\\bytestreamTest\\a.txt";
        //第二个参数，续写开关。true 打开追加功能，默认为false
        FileOutputStream fos = new FileOutputStream(path,true);
        fos.write(97);
        fos.write("\r\n".getBytes());
        fos.write(98);
        fos.write("\r\n".getBytes());
        fos.write(99);
        fos.write("\r\n".getBytes());
        fos.write(100);
        fos.close();
    }
}
